import java.util.Comparator;


public class ComparatorDistance implements Comparator<RainmanPlanet> {

	public int compare(RainmanPlanet p1, RainmanPlanet p2){
		
		if(p1.distance < p2.distance){
			return -1;
		}
		if(p1.distance > p2.distance){
			return 1;
		}
		return 0;
	} 
	
}